]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
status/network: Compare icon name to NULL instead of empty string
authorJonas Dreßler <verdre@v0yd.nl>
Thu, 21 Nov 2019 09:04:12 +0000 (16:04 +0700)
committerFlorian Müllner <fmuellner@gnome.org>
Mon, 13 Jan 2020 13:47:19 +0000 (14:47 +0100)
Since the last commit we set the gicon property of StIcon to NULL if an
empty string was given when setting the icon name, this means
`st_icon_get_icon_name()` will return NULL instead of an empty string.

When `getIndicatorIcon()` returns an empty string, the icon_name
property will now be set to NULL, so compare it to NULL here.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/888

js/ui/status/network.js

index 2f9cd0e2b696856f4631db71b1e79b9e62a30484..a8d2d08932d5220fe0706a3d16150da861db9d53 100644 (file)
@@ -2069,6 +2069,6 @@ class Indicator extends PanelMenu.SystemIndicator {
         }
 
         this._vpnIndicator.icon_name = this._vpnSection.getIndicatorIcon();
-        this._vpnIndicator.visible = this._vpnIndicator.icon_name != '';
+        this._vpnIndicator.visible = this._vpnIndicator.icon_name !== null;
     }
 });